package com.sunyard.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * @author ：xiaog.li
 * @date ： 2019/5/6 17:21
 * @description：请求数据实体类
 * @version: 1.0$
 */
@Data
@Slf4j
@ApiModel
public class RequestInfo<T> implements Serializable {

    private static final long serialVersionUID = -8140230120841116536L;
    /**
     * 请求渠道号
     */
    @ApiModelProperty("请求渠道号(注：智能POS请求渠道sysId为001)")
    private String sysId = "001";
    /**
     * 商户号
     */
    @ApiModelProperty("商户号")
    private String mchntCd;
    /**
     * 商户号
     */
    @ApiModelProperty("店员号")
    private String staffId = "0001";
    /**
     * 终端号
     */
    @ApiModelProperty("终端号")
    private String deviceId;

    @ApiModelProperty("算法类型")
    private String keyType;
    /**
     * data 数据
     */
    private T data;
    /**
     * macValue mac校验值
     */
    @ApiModelProperty("data节点值计算Mac的值截取前16位")
    private String macValue;
    /**
     * 报文加密标记
     */
    @ApiModelProperty("pos报文加密标记,sysId=001时有用:0-加密，1-不加密")
    private int encrtyptFlag;
    /**
     * 报文mac校验标记
     */
    @ApiModelProperty("pos报文mac校验标记,sysId=001时有用:0-计算mac，1-不计算mac")
    private int macFlag;
    /**
     * 终端tmk
     */
    @ApiModelProperty("终端tmk")
    private String TMK;

    /**
     * 版本号
     */
    private String version;
    @ApiModelProperty("终端mak")
    private String MAK;


    @Override
    public String toString() {
        return "RequestInfo{" +
                "sysId='" + sysId + '\'' +
                ", mchntCd='" + mchntCd + '\'' +
                ", staffId='" + staffId + '\'' +
                ", deviceId='" + deviceId + '\'' +
                ", data=" + data +
                ", macValue='" + macValue + '\'' +
                ", encrtyptFlag=" + encrtyptFlag +
                ", macFlag=" + macFlag +
                ", TMK='" + TMK + '\'' +
                ", MAK='" + MAK + '\'' +
                ", keyType='" + keyType + '\'' +
                '}';
    }
}
